package com.jielin.handling.entity.mobileapp;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;
import com.jielin.handling.bean.base.BaseSearch;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Title：MessageNotification.java
 * @Description：消息提醒
 * @author WR
 * @date 2019年8月13日 上午10:58:16
 * @version 1.0
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MessageNotification extends BaseSearch {
	private String id; 			// 主键
	private String content; 	// 内容
	private String unitCode; 	// 单位编号
	private String msgType;		// 消息类型={0:公告1:通知}(默认0:公告)
	private int isDelete; 		// 是否删除={0:未删除1:已删除}(默认0:未删除)
	private Date createDate;	// 创建时间
	private Date modifyDate; 	// 最后一次修改时间

	private String policeCode; 	// 当前人员警号
	private String policeId; 	// 当前人员id

	@Override
	public void setQueryCondition(JSONObject queryCondition) {
		this.unitCode = queryCondition.getString("unitCode");
		this.policeCode = queryCondition.getString("policeCode");
		this.policeId = queryCondition.getString("policeId");
		this.setPageNum(queryCondition.getIntValue("pageNum") == 0 ? 1 : queryCondition.getIntValue("pageNum"));
		this.setPageSize(queryCondition.getIntValue("pageSize") == 0 ? 10 : queryCondition.getIntValue("pageNum"));
	}
}
